package com.hyh.prize.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyh.prize.entity.Acptsite;
import com.hyh.prize.mapper.AcptsiteMapper;
import com.hyh.prize.service.AcptsiteService;
import org.eclipse.jetty.util.StringUtil;
import org.springframework.stereotype.Service;

@Service
public class AcptsiteServiceImpl extends ServiceImpl<AcptsiteMapper, Acptsite> implements AcptsiteService {

    @Override
    public Page getlist(long current, long limit, String addressCode) {
        Page<Acptsite> page=new Page(current,limit);
        QueryWrapper<Acptsite> queryWrapper=new QueryWrapper();
        if(!StringUtil.isEmpty(addressCode)){
            queryWrapper.eq("areaid",addressCode);
        }

        return this.page(page,queryWrapper);
    }
}
